<template>
  <view>
    <view class="news-box">
      <view class="read"><view class="circle" v-if="isRead"></view></view>
      <u--text class="content" :lines="1" text="在营车辆年检通知，为保障车辆能够…" size="14"></u--text>
      <text class="date">05-06 06:16</text>
    </view>
    <view class="news-box">
      <view class="read"><view class="circle"></view></view>
      <u--text class="content" :lines="1" text="在营车辆年检通知，为保障车辆能够…" size="14"></u--text>
      <text class="date">05-06 06:16</text>
    </view>
  </view>
</template>

<script>
export default {
  name: 'PublicNews',
  components: {},
  data() {
    return {
      isRead: false,
      contentType: 200,
      page: 1,
      pageSize: 10
    }
  },
  async created() {
    const res = await uni.$http.get('/messages/page', {
      contentType: this.contentType,
      page: this.page,
      pageSize: this.pageSize
    })
    console.log(res)
  },
  mounted() {},
  async onLoad() {

  },
  methods: {}
}
</script>

<style lang="scss">
.news-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  background-color: #fff;
  border-bottom: 1px solid #f4f4f4;
  .read {
    width: 6px;
    margin: 0 8px;
    .circle {
      height: 6px;
      border-radius: 50%;
      background-color: #ef4f3f;
    }
  }
  .content {
    flex: 1;
  }
  .date {
    margin: 0 15px 0 20px;
    font-size: 12px;
    color: #818181;
  }
}
</style>
